<?php echo $header; ?>
<div id="content">
	<div class="breadcrumb">
	<?php foreach ($breadcrumbs as $breadcrumb) { ?>
	<?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
	<?php } ?>
	</div>
	<?php if ($success) { ?>
	  <div class="success"><?php echo $success; ?></div>
	<?php } ?>
	<?php if ($error_permission) { ?>
	  <div class="warning"><?php echo $error_permission; ?></div>
	<?php } ?>
	<?php if ($error_giftcheck) { ?>
	  <div class="warning"><?php echo $error_giftcheck; ?></div>
	<?php } ?>
	<div class="box">
	<div class="heading">
		<h1><img src="view/image/module.png" alt="" /> <?php echo $heading_title; ?></h1>
		<div class="buttons"><a href="<?php echo $add_action;?>" class="button"><?php echo $button_add; ?></a><a onclick="$('#form').submit();" class="button"><?php echo $button_delete; ?></a></div>
	</div>
	<div class="content">
		<form action="<?php echo $action_delete; ?>" method="post" enctype="multipart/form-data" id="form">
		<?php if($gifts) : ?>
		<table id="module" class="list">
			<thead>
			<tr>
				<td></td>
				<td class="left"><?php echo $entry_id; ?></td>
				<td class="left"><?php echo $entry_name; ?></td>
				<td class="left"><?php echo $entry_made_for; ?></td>
				<td class="left"><?php echo $entry_date_start; ?></td>
				<td class="left"><?php echo $entry_date_end; ?></td>
				<td class="left"><?php echo $entry_edit; ?></td>
			</tr>
			</thead>
			<tbody>
			<?php foreach ($gifts as $gift) { ?>
			<?php $options = unserialize(base64_decode($gift['options']));?>
			<tr>
				<td><input type="checkbox" value="<?php echo $gift['id']; ?>" name="delete[]"/></td>
				<td class="left"><span><?php echo $gift['id'];?></span></td>
				<td class="left"><span><?php echo $gift['name'];?></span></td>
				<td class="left"><span><?php echo $options['this_gift_made_for'];?></span></td>
				<td class="left"><span><?php echo $gift['date_start'];?></span></td>
				<td class="left"><span><?php echo $gift['date_end'];?></span></td>
				<td class="left"><a href="<?php echo $this->url->link('module/td_giftonorder/getEdit', 'token=' . $this->session->data['token'], 'SSL');?>&gift_id=<?php echo $gift['id'];?>"><?php echo $entry_edit;?></a></td>
			</tr>
			<?php } ?>
			</tbody>
		</table>
		<?php endif;?>
		</form>
	</div>
	</div>
</div>
<?php echo $footer; ?>